<template>
    <div>
        <a :href="link" :class="classList" class="a-href" :style="linkCss" style="font-size:20px;">baidu</a>
        <br>
        <a :href="link" v-if="isShow">I am partA</a>
        <a :href="link" v-else>I am another part !</a>
        <!--<a :href="link" v-show="!isShow">I am partB</a>-->
        <br>
        <button @click="toggle">toggle</button>
    </div>
</template>

<script>
export default{
    data(){
        return {
            link:'http://www.baidu.com',
            classList:"target-href red-href",
            linkCss:{
                'color':'red'
            },
            isShow:true
        }
    },
    methods:{
        toggle(){
            this.isShow=!this.isShow
        }
    }
}
</script>